﻿@model Qu.SeniorProject.Model.Project

@{
    Layout = null;
}

@*<html>
<head>*@
    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.colorbox-min.js")" type="text/javascript"></script>

    <style type="text/css">
        td {
          background-color:#FFF;
          padding:5px;
          width: 100%;
        }
        .col1
        {
            width: 100%;
            padding:5px;
        }
        textarea 
        {
          display: block;
          width:100%;
          height:100%;
          border:1px solid blue;
        }

      </style>

          <script language="javascript" type="text/javascript">
              $(function () {
                  $("#btnSave").click(function () {
                      $.post($("#editForm").attr("action"),
                        $("#editForm").serialize(),
                        function (data) {
                            $("#result").html(data);
                        });
                        $.colorbox.close();
                        return false;
                  });
              });
         </script>


@*</head>

<body>*@

@{
    ViewBag.Title = "Edit Project Details";
}

<div id="result"></div>  

<h2>Edit Project</h2>



@*                     $("#EditForm").validate();
//                 $("#btnSave").click(function () {
//                     $.post($(this).attr("action"), $(this).serialize(),
//                        function (response) {
//                            $("#Message").append(response);
//                        });
//                     return false;
//                 })
             });
     <script>
          $(document).ready(function () {
             
          });
      </script>*@

@using (Html.BeginForm("EditProject", "Home", FormMethod.Post, new {id="editForm"}))
{
        @Html.ValidationSummary(true)
    
        @Html.HiddenFor(model => model.ProjectId)
        <table>
        <tr><td>
           @* <div class="editor-label" >*@
               <em>*</em><strong>Project Title</strong>
    @*        </div>*@
        </td></tr>
        <tr><td align="justify">
@*            <div class="editor-field">*@
                @Html.TextBoxFor(model => model.ProjectTitle)
@*                , 
                        new Dictionary<string, object>
                        {
                            //{"width", "100%"},
                            {"class", "required"}
                        })*@
                @Html.ValidationMessageFor(model => model.ProjectTitle)
@*            </div>*@
        </td></tr>
        <tr><td>
   @*         <div class="editor-label">*@
                <em>*</em><strong>Project Description</strong>
@*            </div>*@
        </td></tr>
        <tr><td>
@*            <div class="editor-field">*@
                @Html.TextAreaFor(model => model.ProjectDescription)
@*                //new Dictionary<string, object>
                //    {
                //        {"class", "required"},
                //        {"minlength", "200"}
                //    })*@
                @Html.ValidationMessageFor(model => model.ProjectDescription)
     @*       </div>*@
        </td></tr>
        <tr><td align="center">
            <input type="submit" value="Save" id="btnSave" />
        </td></tr>
    </table>
}

@*</body>
</html>*@
